package com.ruoyi.web.controller.pc.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.blogs.domain.BsAnswer;
import com.ruoyi.blogs.service.IBsAnswerService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "回答")
@RestController
@RequestMapping("/user/answer")
public class UserAnswerController extends BaseController {
  
    @Autowired
    private IBsAnswerService bsAnswerService;

    /**
     * 新增回答
     */
    @ApiOperation("新增回答")
    @PostMapping
    public R<Integer> add(@RequestBody BsAnswer bsAnswer)
    {
        return R.ok(bsAnswerService.insertBsAnswer(bsAnswer));
    }
}
